getScript = () => {
    // var prefabIndex = 0;
    // var nodeId = ID;
    // prefabIndex++;
    // global.curID++;
    // global.finialInfo.push(addScript());
    var prefabIndex = 0;
    for (var i = 0; i < global.UnityNode.length; i++) {
        var d = global.UnityNode[i];
        for(var j = 0;j<d.Script.length;j++) {
          if (d.Script[j].Add) {
            var nodeId = d.ID;
            prefabIndex++;
            global.curID++;
            global.finialInfo.push(addScript(nodeId,d.Script[j]));
        }
        }
    }
}
addScript= (nodeId,data) => {
    var d = {
        "__type__": data.Type,
        "_name": "",
        "_objFlags": 0,
        "node": {
          "__id__": nodeId
        },
        "_enabled": true,
        "_id": ""
    }
    if(data.Type == "6f17fuafvBOn5wwfDfNMlUo") {
        d = {
            "__type__": data.Type,
            "_name": "",
            "_objFlags": 0,
            "node": {
              "__id__": nodeId
            },
            "_enabled": true,
            "ignoreTags":data.IgnoreTags,
            "_id": ""
        }
    }
    if (global.isShowId) d["ID"] = global.curID;
    return d;
}
module.exports = {
    getScript,
};